function loginout(){
	parent.layer.confirm("您确定要退出系统吗?", {
	    btn: ['确定','取消'], //按钮
	    shade: true, //不显示遮罩
	    shadeClose: true,
        shade: 0.5,
	}, function(){
		top.location.href = ctx + '/user/loginout';
	}, function(){
	    
	});
}

function showOK(title,msg){
	swal({
        title: title,
        text: msg,
        type: "success"
    });
}
function showError(title,msg){
	swal({
        title: title,
        text: msg,
        type: "error"
    });
}
$(function(){
	$(document).keydown(function (e) {
	    var keyCode = e.keyCode || e.which;
	    //屏蔽网页缩放
	    //屏蔽Ctrl + -
	    if(e.ctrlKey && keyCode == 109 || e.ctrlKey && keyCode == 189){
	        e.preventDefault();
	        window.event.returnValue = false;
	    }
	    //屏蔽Ctrl + +
	    if(e.ctrlKey && keyCode == 107 || e.ctrlKey && keyCode == 187){
	        e.preventDefault();
	        window.event.returnValue = false;
	    }
	    //屏蔽鼠标滚轮+Ctrl
	    if(e.wheelDelta && event.ctrlKey){
	        e.preventDefault();
	        window.event.returnValue = false;
	    }
	});
	$("#btn-reset").click(function(){
		var query_form = $(".query-form");
		query_form.find("input[class!='required-text']").val("");
		query_form.find("select option:eq(0)").attr("selected","selected");
		query_form.find("input[type='checkbox']").attr("checked","");
		query_form.find("input[type='radio']").attr("checked","");
		query_form.find("textarea").val("");
		query_form.submit();
	});
});